<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  /*张鹏欢*/
  function myBind(target, ...params) {
    let fun = this;
    const fn = function (...params2) {
      return fun.call(target, [...params, ...params2])
    };
    // 作用 :
    fn.prototype = Object.create(fun.prototype);
    fn.prototype.constructor = fn;
    return fn
  }

  function Person(params) {
    console.log(this, params)
  }

  Function.prototype.myBind = myBind;
  let fn = Person.myBind({abc: 1111}, 123);
  fn()

</script>
</body>
</html>
